package com.demo.intercept;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * FileName: Intercept
 *
 * @author: xunyong
 * Date:     2019/5/14 13:57
 * Description: 自定义Intercept注解类
 */

@Target({ElementType.METHOD, ElementType.TYPE}) //注解的范围是类、接口、枚举的方法上
@Retention(RetentionPolicy.RUNTIME) //被虚拟机保存，可用反射机制读取
public @interface Intercept {

    boolean required() default true; //设置返回的默认值为true
}